package com.example.infrastructure.domain.person.repo.po;

import com.example.infrastructure.domain.person.aggregate.valueObject.Gender;
import com.example.infrastructure.domain.person.aggregate.valueObject.PersonType;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * TODO
 *
 * @author lxh
 * @date 2020/11/23 上午11:42
 **/
@Entity
@Table(name = "person")
@Data
public class PersonPo {
    @Id
    @GenericGenerator(name = "idGenerator", strategy = "uuid")
    @GeneratedValue(generator = "idGenerator")
    @Column(name = "person_id")
    private String personId;

    private String name;

    @Enumerated(EnumType.ORDINAL)
    private Gender gender;

    @Enumerated(EnumType.STRING)
    @Column(name = "type")
    private PersonType type;

    private String mobile;
    private String orgId;
}
